package com.pe.cineplanet.proyectocine.web;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.pe.cineplanet.proyectocine.domain.Combo;
import com.pe.cineplanet.proyectocine.repository.ComboRepository;


@Controller
public class ComboController {

	@Autowired
	ComboRepository daoCombo;
	
	@RequestMapping(value = "/combos")
	public String index(Model model) {

		List<Combo> combos = daoCombo.obtenerCombos();
		model.addAttribute("data", combos);
		return "vistaCombos";

	}
	
}
